package com.yangxk.kadmin.generator.url.sub;

import com.yangxk.kadmin.generator.constant.Const;
import com.yangxk.kadmin.generator.util.Tools;

import java.util.HashMap;
import java.util.Map;

public class TreeTableUrl extends AbstractUrl {

    private static final String TREE = "/{0}/tree";

    public TreeTableUrl(String modelName, String zhModelName) {
        this.modelName = modelName.toLowerCase();
        this.zhModelName = zhModelName;
        super.init();
    }

    @Override
    protected Map<String, String> addUrl() {
        Map<String, String> map = new HashMap<>();
        map.put(Const.TREE_URL, Tools.formatStr(TREE, modelName));

        return map;
    }

    @Override
    public String getRoute() {
        return Tools.formatStr(TREE, modelName);
    }
}
